n = int(input("请输入一个正整数："))

step = 0
while n!=1:
    if n%2==1:
        n = n * 3 + 1
    else:
        n = n//2
    step+=1

print(step)